﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace TestSchool
{
    [TestClass()]
    public class StudentTest
    {
        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        [TestMethod()]
        public void StudentConstructorTest()
        {
            string name = "Ba4e Kiro"; 
            int facultyNumber = 64565; 
            Student target = new Student(name, facultyNumber);
        }


        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]        
        public void StudentConstructorTestBigFn()
        {
            string name = "Ba4e Kiro";
            int facultyNumber = 1000000;
            Student target = new Student(name, facultyNumber);
        }

        [TestMethod()]
        [ExpectedException(typeof(ArgumentOutOfRangeException))]
        public void StudentConstructorTestSmallFn()
        {
            string name = "Ba4e Kiro";
            int facultyNumber = 465;
            Student target = new Student(name, facultyNumber);
        }

        [TestMethod()]
        [ExpectedException(typeof(ArgumentNullException))]
        public void StudentConstructorTestNullName()
        {
            string name = "";
            int facultyNumber = 64565;
            Student target = new Student(name, facultyNumber);
        }

    }
}
